package com.celesea.auth.menu.vo;

import com.celesea.auth.menu.entity.Menu;
import com.google.common.collect.Lists;

import java.util.List;

/**
 * ${DESCRIPTION}
 *
 * @author JackYuan
 * @create 2017-10-25 20:55
 */
public class MenuVo {
    private String module;
    private String name;
    private String icon;
    private String url;
    private Byte leaf;
    private List<MenuVo> children;

    public MenuVo(Menu menu) {
        this.module=menu.getModule();
        this.name = menu.getName();
        this.icon = menu.getIcon();
        this.url = menu.getUrl();
        this.leaf = menu.getLeaf();
        this.children= Lists.newArrayList();
    }

    public String getModule() {
        return module;
    }

    public String getName() {
        return name;
    }

    public String getIcon() {
        return icon;
    }

    public String getUrl() {
        return url;
    }

    public Byte getLeaf() {
        return leaf;
    }

    public List<MenuVo> getChildren() {
        return children;
    }
}
